
package com.sx.core.page;

/**
 * TODO: DOCUMENT ME!
 *
 * @author   <a href="mailto:lihao@ozstrategy.com">Hao Li</a>
 * @version  03/27/2017 17:07
 */
public interface Pageable {
  //~ Methods ----------------------------------------------------------------------------------------------------------

  /**
   * first.
   *
   * @return  Pageable
   */
  Pageable first();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * getter method for offset.
   *
   * @return  int
   */
  int getOffset();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * getter method for page number.
   *
   * @return  int
   */
  int getPageNumber();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * getter method for page size.
   *
   * @return  int
   */
  int getPageSize();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * getter method for sort.
   *
   * @return  Sort
   */
  Sort getSort();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * hasPrevious.
   *
   * @return  boolean
   */
  boolean hasPrevious();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * next.
   *
   * @return  Pageable
   */
  Pageable next();

  //~ ------------------------------------------------------------------------------------------------------------------

  /**
   * previousOrFirst.
   *
   * @return  Pageable
   */
  Pageable previousOrFirst();
} // end interface Pageable
